nested loop to a dict in order to turn into a json

welcome to shbcf.ru